import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import('@/views/Login/indexHome')

  },
  {
    path: '/',
    component: () => import('@/views/Layout/indexLayout'),
    redirect: '/dashboard',
    children: [
      {
        path: '/dashboard',
        component: () => import('@/views/Layout/WorkHome')

      },
      {
        path: '/warehouse',
        component: () => import('@/views/Message/CkMessage')

      },

      {
        path: '/warehouse/detail/:id',
        component: () => import('@/views/Message/AddCk')
      },
      {
        path: '/area',
        component: () => import('@/views/Message/KqEare')
      },
      {
        path: '/area/detail/:id',
        component: () => import('@/views/Message/AddKq')
      }, {

        path: '/location',
        component: () => import('@/views/Message/LocationArea')

      },
      {

        path: '/location/details/:id',
        component: () => import('@/views/Message/AddLocation')

      },
      {

        path: '/location-view',
        component: () => import('@/views/Message/LocationView')

      },
      {

        path: '/goods',
        component: () => import('@/views/Message/GoodS')

      }

    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
